import React, { Component } from 'react';
import {BrowserRouter as Router,Link,Route} from "react-router-dom"
// React 种的路由参数
class Role extends Component{
  render(){
    console.log(this.props);
    let { params } = this.props.match;
    return <h1>角色的页面: {params.id} {params.name}</h1>
  }
}
class App extends Component {
  render() {
    return (
      <Router>
        <Link to="/user/666/thomaslwq">用户</Link>
        <Route path="/user/:id/:name" component={Role}></Route>
      </Router>
    );
  }
}

export default App;
